function [PQ] = PQ_Sort(PQ)
  % First randomise (if some priorities are the same)
  ind = randperm(PQ_Size(PQ));
  PQ = PQ(ind,:);
  PQ = sortrows(PQ, -2);
end